﻿using MyCode.Project.Infrastructure.Constant;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyCode.Project.Domain.Businesses.Sms.Templates
{
    /// <summary>
    /// 短信-预约成功模板
    /// </summary>
    public class SmsPreOrderSuccessTemplate : SmsTemplateBase
    {
        /// <summary>
        /// 订单时间
        /// </summary>
        public DateTime OrderTime { get; set; }

        /// <summary>
        /// 店铺
        /// </summary>
        public string Shop { get; set; }

        /// <summary>
        /// 服务
        /// </summary>
        public string Service { get; set; }

        /// <summary>
        /// 微信公众号名
        /// </summary>
        public string WechatPublic { get; set; } = WechatConfigConst.WechatPublic;

        /// <summary>
        /// 初始化一个<see cref="SmsPreOrderSuccessTemplate"/>类型的实例
        /// </summary>
        public SmsPreOrderSuccessTemplate() : base(SmsTemplateConfigConst.PreOrderSuccess)
        {
        }

        /// <summary>
        /// 初始化参数
        /// </summary>
        protected override void InitParamValue()
        {
            Add(LxmConst.SmsTemplate.MONTH_KEY, OrderTime.Month);
            Add(LxmConst.SmsTemplate.DAY_KEY, OrderTime.Day);
            Add(LxmConst.SmsTemplate.SHOP_KEY, Shop);
            Add(LxmConst.SmsTemplate.SERVICE_KEY, Service);
            Add(LxmConst.SmsTemplate.WECHAT_PUBLIC_KEY, WechatPublic);
        }
    }
}
